Integrand size = 31, antiderivative size = 163 \[ \int \frac {(b \sec (c+d x))^n (A+B \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx=-\frac {2 A \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (3-2 n),\frac {1}{4} (7-2 n),\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d (3-2 n) \sec ^{\frac {3}{2}}(c+d x) \sqrt {\sin ^2(c+d x)}}-\frac {2 B \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (1-2 n),\frac {1}{4} (5-2 n),\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d (1-2 n) \sqrt {\sec (c+d x)} \sqrt {\sin ^2(c+d x)}} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {20, 3872, 3857, 2722} \[ \int \frac {(b \sec (c+d x))^n (A+B \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx=-\frac {2 A \sin (c+d x) (b \sec (c+d x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (3-2 n),\frac {1}{4} (7-2 n),\cos ^2(c+d x)\right )}{d (3-2 n) \sqrt {\sin ^2(c+d x)} \sec ^{\frac {3}{2}}(c+d x)}-\frac {2 B \sin (c+d x) (b \sec (c+d x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (1-2 n),\frac {1}{4} (5-2 n),\cos ^2(c+d x)\right )}{d (1-2 n) \sqrt {\sin ^2(c+d x)} \sqrt {\sec (c+d x)}} \]
[In]
[Out]
Rule 20
Rule 2722
Rule 3857
Rule 3872
Rubi steps \begin{align*} \text {integral}& = \left (\sec ^{-n}(c+d x) (b \sec (c+d x))^n\right ) \int \sec ^{-\frac {1}{2}+n}(c+d x) (A+B \sec (c+d x)) \, dx \\ & = \left (A \sec ^{-n}(c+d x) (b \sec (c+d x))^n\right ) \int \sec ^{-\frac {1}{2}+n}(c+d x) \, dx+\left (B \sec ^{-n}(c+d x) (b \sec (c+d x))^n\right ) \int \sec ^{\frac {1}{2}+n}(c+d x) \, dx \\ & = \left (A \cos ^{\frac {1}{2}+n}(c+d x) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n\right ) \int \cos ^{\frac {1}{2}-n}(c+d x) \, dx+\left (B \cos ^{\frac {1}{2}+n}(c+d x) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n\right ) \int \cos ^{-\frac {1}{2}-n}(c+d x) \, dx \\ & = -\frac {2 A \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (3-2 n),\frac {1}{4} (7-2 n),\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d (3-2 n) \sec ^{\frac {3}{2}}(c+d x) \sqrt {\sin ^2(c+d x)}}-\frac {2 B \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (1-2 n),\frac {1}{4} (5-2 n),\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d (1-2 n) \sqrt {\sec (c+d x)} \sqrt {\sin ^2(c+d x)}} \\ \end{align*}
Time = 0.27 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.83 \[ \int \frac {(b \sec (c+d x))^n (A+B \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx=\frac {2 \csc (c+d x) (b \sec (c+d x))^n \left (A (1+2 n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (-1+2 n),\frac {1}{4} (3+2 n),\sec ^2(c+d x)\right )+B (-1+2 n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (1+2 n),\frac {1}{4} (5+2 n),\sec ^2(c+d x)\right ) \sec (c+d x)\right ) \sqrt {-\tan ^2(c+d x)}}{d \left (-1+4 n^2\right ) \sec ^{\frac {3}{2}}(c+d x)} \]
[In]
[Out]
\[\int \frac {\left (b \sec \left (d x +c \right )\right )^{n} \left (A +B \sec \left (d x +c \right )\right )}{\sqrt {\sec \left (d x +c \right )}}d x\]
[In]
[Out]
\[ \int \frac {(b \sec (c+d x))^n (A+B \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx=\int { \frac {{\left (B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n}}{\sqrt {\sec \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {(b \sec (c+d x))^n (A+B \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx=\int \frac {\left (b \sec {\left (c + d x \right )}\right )^{n} \left (A + B \sec {\left (c + d x \right )}\right )}{\sqrt {\sec {\left (c + d x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {(b \sec (c+d x))^n (A+B \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx=\int { \frac {{\left (B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n}}{\sqrt {\sec \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {(b \sec (c+d x))^n (A+B \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx=\int { \frac {{\left (B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n}}{\sqrt {\sec \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(b \sec (c+d x))^n (A+B \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx=\int \frac {\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (\frac {b}{\cos \left (c+d\,x\right )}\right )}^n}{\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \]
[In]
[Out]